%% Plotting moving ECG
% data: data points recorded in the file (.bin)
% Revised date: 8th Oct 2010
%
function water_ecg = ecgplot3(data)
    for index = 1:length(data)
            %% Plotting
       waterfall(1:length(data),data,1)
            %% Setting axes
        % Auto for y-axis
        % Fixed X-axis value
        axis([0+(index-1),1500+(index-1),10000,20000]);
        axis 'auto y'
            %% Labeling axes 
        xlabel('Magnitude (dB)')
        ylabel('time (s)')
             %% Setting artistic properties
        set(findobj('Type','line'),'Color','g')
        set(gca,'Color','k')
        pause(0.001)
    end